import type { RouteRecordRaw } from 'vue-router';
import MainLayout from 'layouts/MainLayout.vue';

const routes: RouteRecordRaw[] = [
  {
    name: 'Layout',
    path: '/',
    redirect: '/home',
    component: MainLayout,
    children: [
      {
        name: 'Home',
        path: '/home',
        meta: {
          tableTitle: '主页',
          requiresAuth: true
        },
        component: () => import('../pages/IndexPage.vue')
      },
      {
        name: 'Preview',
        path: '/mod/mod_preview',
        meta: {
          tableTitle: '模版预览',
          requiresAuth: true
        },
        component: () => import('../pages/mod/preview/Index.vue')
      }
    ]
  },

  {
    name: 'Login',
    path: '/auth/login',
    component: () => import('pages/auth/Login.vue')
  },

  // Always leave this as last one,
  // but you can also remove it
  {
    name: '404',
    path: '/404',
    meta: {
      tableTitle: '错误'
    },
    component: () => import('pages/ErrorNotFound.vue')
  }
];




export default routes;
